# ---
# title: 1329. Sort the Matrix Diagonally
# id: problem1329
# author: Tian Jun
# date: 2020-10-31
# difficulty: Medium
# categories: Array, Sort
# link: <https://leetcode.com/problems/sort-the-matrix-diagonally/description/>
# hidden: true
# ---
# 
# Given a `m * n` matrix `mat` of integers, sort it diagonally in ascending
# order from the top-left to the bottom-right then return the sorted array.
# 
# 
# 
# **Example 1:**
# 
# ![](https://assets.leetcode.com/uploads/2020/01/21/1482_example_1_2.png)
# 
#     
#     
#     Input: mat = [[3,3,1,1],[2,2,1,2],[1,1,1,2]]
#     Output: [[1,1,1,1],[1,2,2,2],[1,2,3,3]]
#     
# 
# 
# 
# **Constraints:**
# 
#   * `m == mat.length`
#   * `n == mat[i].length`
#   * `1 <= m, n <= 100`
#   * `1 <= mat[i][j] <= 100`
# 
# 
## @lc code=start
using LeetCode

## add your code here:
## @lc code=end
